// 引入Service和请求头ServiceName
import { Service, ServiceName } from '@/network/http.js'
import store from '@/store/index.js' // 引入store
const api = {
  // 新增入库保存
  dryingInsert(params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}//api/external/dryingOperation/dryingInsert`, params
    )
  },
  // 入窑查询
  getKilnEntryList(params) {
    return Service.get(
      `/${ServiceName}/api/external/dryingOperation/getKilnEntryList`,
      { params }
    )
  },
  //  入窑保存
  kilnEntry(params) {
    store.commit('changeStatus', true)
    return Service.put(
      `/${ServiceName}/api/external/dryingOperation/kilnEntry`,
      params
    )
  },
  // 出窑数据查询
  getKilnDischargeList(params) {
    return Service.get(
      `/${ServiceName}/api/external/dryingOperation/getKilnDischargeList`,
      { params }
    )
  },
  // 出窑
  kilnDischarge(params) {
    store.commit('changeStatus', true)
    return Service.put(
      `/${ServiceName}/api/external/dryingOperation/KilnDischarge`,
      params
    )
  },
  // 转窑
  rotaryKiln(params) {
    store.commit('changeStatus', true)
    return Service.put(
      `/${ServiceName}/api/external/dryingOperation/RotaryKiln`,
      params
    )
  },
  // 放货数据查询
  getReleaseList(params) {
    return Service.get(
      `/${ServiceName}/api/external/dryingOperation/getReleaseList`,
      { params }
    )
  },
  // 放货保存
  release(params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/dryingOperation/release`,params 
    )
  },
}
export default api